package com.miaoxie.domain;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: miaoxie
 * Date: 2018-01-23
 * Time: 上午11:34
 */
public class UserEntity {
    String name;
    int age;
    String sex;

    public UserEntity() {
    }

    public UserEntity(String name, Integer age, String sex) {
        setName(name);
        setAge(age);
        setSex(sex);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        if (name != null && !name.isEmpty()){
            this.name = name;
        }else {
            this.name = "Defult";
        }

    }

    public int getAge() {
        return age;
    }

    public void setAge(Integer age) {
        if (age != null && age>0){
            this.age = age;
        }else{
            this.age = 1;
        }

    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
}
